# vim: ft=make

VERBOSE ?= 2

BACKEND_VMM ?= xen

GIT_BASEURL ?= https://github.com
GIT_PREFIX ?= QubesOS/qubes-

DIST_DOM0 ?=
DISTS_VM ?=
#NO_CHECK=1
NO_SIGN=1

#CACHE_CHROOT = 1

# save space and time on Travis-CI
DISCARD_PREPARED_IMAGE = 1

# increase default root size for tests (Gentoo needs space)
TEMPLATE_ROOT_SIZE=20G

COMPONENTS = \
    builder-rpm \
    builder-debian \
    builder-archlinux \
    builder-gentoo \
    mgmt-salt

BUILDER_PLUGINS ?= builder-rpm builder-debian builder-archlinux builder-gentoo mgmt-salt

# Debian package names
DEPENDENCIES ?= rpm createrepo yum yum-utils mock devscripts rsync

GIT_URL_builder_gentoo = https://github.com/fepitre/qubes-builder-gentoo
GIT_URL_gentoo = https://github.com/fepitre/qubes-gentoo

import-fepitre-key:
	@if ! [ -d "$(KEYRING_DIR_GIT)" ]; then \
		export GNUPGHOME="$(KEYRING_DIR_GIT)"; \
		scripts/verify-git-tag; \
		cat "$(BUILDER_DIR)/keys/9FA64B92F95E706BF28E2CA6484010B5CDC576E2.asc" | gpg --import || exit 1; \
		echo '9FA64B92F95E706BF28E2CA6484010B5CDC576E2:6:' | gpg --import-ownertrust; \
	fi

get-sources: import-fepitre-key